<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>人员脚本导入</title>
    <#include "/pubHeadStyle.html">
</head>
<body>
<!-- 表单布局 -->
<form class="layui-fluid bpmAuthorizeAdd layui-form" lay-filter="formTest" style="overflow: auto;">
    <div class="layui-row" style="border-top: 1px solid #ccc;">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">脚本别名：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="aliasName" lay-filter="aliasName" placeholder="请输入" autocomplete="off" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">脚本描述：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="aliasDesc" lay-filter="aliasDesc" placeholder="请输入" autocomplete="off" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">脚本类型：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <select name="scriptType" lay-filter="scriptType" disabled="">
                    <option value="default">系统默认</option>
                    <option value="custom">自定义</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">脚本所在类的类名：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="className" lay-filter="className" class="layui-input" disabled="">
                <input type="hidden" name="id" value="${aliasScript.id}">
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">调用类的对象名：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="classInsName" lay-filter="classInsName" placeholder="请输入" autocomplete="off" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <div class="layui-form-label" style="text-align: right;line-height: 38px;">调用方法：</div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="methodName" lay-filter="methodName" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <div class="layui-form-label" style="text-align: right;line-height: 38px;">调用的方法的描叙：</div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="methodDesc" placeholder="请输入" autocomplete="off" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <div class="layui-form-label" style="text-align: right;line-height: 38px;">方法返回类型：</div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <input type="text" name="returnType" placeholder="请输入" autocomplete="off" class="layui-input" disabled="">
            </div>
        </div>
    </div>
    <div class="layui-row default">
        <div class="layui-col-md2">
            <div class="layui-form-label" style="text-align: right;line-height: 38px;">参数信息：</div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                ${aliasScript.argument}
            </div>
        </div>
    </div>
    <div class="layui-row custom">
        <div class="layui-col-md2">
            <div class="layui-form-label" style="text-align: right;line-height: 38px;">脚本内容：</div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <textarea rows="5" name="scriptComten" placeholder="请输入内容" class="layui-textarea" disabled=""></textarea>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md2">
            <label class="layui-form-label" style="text-align: right;line-height: 38px;">是否启用：</label>
        </div>
        <div class="layui-col-md10">
            <div class="layui-input-block">
                <select name="enable" lay-filter="enable" disabled="">
                    <option value="0">是</option>
                    <option value="1">否</option>
                </select>
            </div>
        </div>
    </div>
</form>
<!-- 三个及以上个 弹窗时启用的-->
<div id="windowUrls" style="display: none"></div>
<script type="text/html" id="bar">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script>
    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index','form','table','setter'],function(){
        var $ = layui.$;
        var form = layui.form;
        var table = layui.table;
        var setter = layui.setter;

        $('head').append('<link href="/css/workflow.css" rel="stylesheet" type="text/css" />');
        // 滚动条显示
        $('.layui-layout-body').css('overflow','auto');

        var id = "${aliasScript.id}";
        var aliasScriptScriptType = '${aliasScript.scriptType}'
        if (aliasScriptScriptType=='custom'){
            form.val("formTest", {
                "aliasName": "${aliasScript.aliasName}", // "name": "value"
                "aliasDesc": "${aliasScript.aliasDesc}", // "name": "value"
                "scriptType": "${aliasScript.scriptType}", // "name": "value"
                "className": "${aliasScript.className}", // "name": "value"
                "classInsName": "${aliasScript.classInsName}", // "name": "value"
                "methodName": "${aliasScript.methodName}", // "name": "value"
                "methodDesc": "${aliasScript.methodDesc}", // "name": "value"
                "returnType": "${aliasScript.returnType}", // "name": "value"
                "scriptComten": "${aliasScript.scriptComten}", // "name": "value"
                "enable": "${aliasScript.enable}", // "name": "value"
            });
            $('.custom').show();
            $('.default').hide();
        }else {
            form.val("formTest", {
                "aliasName": "${aliasScript.aliasName}", // "name": "value"
                "aliasDesc": "${aliasScript.aliasDesc}", // "name": "value"
                "scriptType": "${aliasScript.scriptType}", // "name": "value"
                "className": "${aliasScript.className}", // "name": "value"
                "classInsName": "${aliasScript.classInsName}", // "name": "value"
                "methodName": "${aliasScript.methodName}", // "name": "value"
                "methodDesc": "${aliasScript.methodDesc}", // "name": "value"
                "returnType": "${aliasScript.returnType}", // "name": "value"
                "scriptComten": "${aliasScript.scriptComten}", // "name": "value"
                "enable": "${aliasScript.enable}", // "name": "value"
            });
            $('.custom').hide();
            $('.default').show();
        }
    });
</script>
</body>
</html>